package com.itheima.demo3;

public class Demo3 {
    public static void main(String[] args) {
       /* Swim swim=(name)->{
            System.out.println(name+"游泳");
        };
        swim.swimming("狗");*/
       useSwim((name)->{
            System.out.println(name+"游泳");
        });

    }
    public static void useSwim(Swim swim){
        swim.swimming("狗");
    }
}
interface Swim{
    void swimming(String name);
}